<?php

/**
 * ApplicationCorporateManaged form base class.
 *
 * @method ApplicationCorporateManaged getObject() Returns the current form's model object
 *
 * @package    digitalform
 * @subpackage form
 * @author     Saul Santiago
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseApplicationCorporateManagedForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                                                     => new sfWidgetFormInputHidden(),
      'ref_number'                                             => new sfWidgetFormInputText(),
      'company_name'                                           => new sfWidgetFormInputText(),
      'business_address'                                       => new sfWidgetFormInputText(),
      'business_brgy_municipality_town'                        => new sfWidgetFormInputText(),
      'business_city_province'                                 => new sfWidgetFormInputText(),
      'business_postal_code_zip_code'                          => new sfWidgetFormInputText(),
      'number_of_employees'                                    => new sfWidgetFormChoice(array('choices' => array('1-50' => '1-50', '51-100' => '51-100', '101-200' => '101-200', '201-500' => '201-500', '501-1,000' => '501-1,000', '1,001 & UP' => '1,001 & UP'))),
      'nature_of_business'                                     => new sfWidgetFormChoice(array('choices' => array('GOVERNMENT' => 'GOVERNMENT', 'BPO/CALL CENTER' => 'BPO/CALL CENTER', 'HOLDINGS COMPANY' => 'HOLDINGS COMPANY', 'POWER & UTILITIES' => 'POWER & UTILITIES', 'PETROLEUM' => 'PETROLEUM', 'INSURANCE' => 'INSURANCE', 'BANKING' => 'BANKING', 'LOGISTICS' => 'LOGISTICS', 'TRANSPORT & FREIGHT' => 'TRANSPORT & FREIGHT', 'RETAIL' => 'RETAIL', 'HOTELS & RESORTS' => 'HOTELS & RESORTS', 'MANUFACTURING' => 'MANUFACTURING', 'SEMICON & ELECTRONICS' => 'SEMICON & ELECTRONICS', 'PHARMACEUTICALS' => 'PHARMACEUTICALS', 'GLOBAL SERVICE PROVIDER' => 'GLOBAL SERVICE PROVIDER', 'LOCAL TELCO/ISP' => 'LOCAL TELCO/ISP', 'MEDIA' => 'MEDIA'))),
      'latest_ranking_of_company'                              => new sfWidgetFormChoice(array('choices' => array('Top 50' => 'Top 50', 'Top 100' => 'Top 100', 'Top 250' => 'Top 250', 'Top 500' => 'Top 500', 'Top 1,000' => 'Top 1,000', 'Beyond 1,000' => 'Beyond 1,000'))),
      'sector'                                                 => new sfWidgetFormInputText(),
      'number_of_lines_applied_for'                            => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory1'                => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory1_position'       => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory1_contact_number' => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory1_email_address'  => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory2'                => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory2_position'       => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory2_contact_number' => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory2_email_address'  => new sfWidgetFormInputText(),
      'after_sales_signatory_ies1'                             => new sfWidgetFormInputText(),
      'after_sales_signatory_ies1_position'                    => new sfWidgetFormInputText(),
      'after_sales_signatory_ies1_contact_number'              => new sfWidgetFormInputText(),
      'after_sales_signatory_ies1_email_address'               => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory3'                => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory3_position'       => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory3_contact_number' => new sfWidgetFormInputText(),
      'authorized_corporate_officer_signatory3_email_address'  => new sfWidgetFormInputText(),
      'vat'                                                    => new sfWidgetFormInputCheckbox(),
      'vat_bir_certificate_account_number'                     => new sfWidgetFormInputText(),
      'oct'                                                    => new sfWidgetFormInputCheckbox(),
      'oct_bir_certificate_account_number'                     => new sfWidgetFormInputText(),
      'corporate_managed_bills_sent_to'                        => new sfWidgetFormChoice(array('choices' => array('ONE RECIPIENT' => 'ONE RECIPIENT', 'ASSIGNEES' => 'ASSIGNEES'))),
      'bill_recipient_company_name'                            => new sfWidgetFormInputText(),
      'bill_recipient_attention'                               => new sfWidgetFormInputText(),
      'bill_recipient_unit_number_floor'                       => new sfWidgetFormInputText(),
      'bill_recipient_department'                              => new sfWidgetFormInputText(),
      'bill_recipient_building_street'                         => new sfWidgetFormInputText(),
      'receive_bill_summary'                                   => new sfWidgetFormInputCheckbox(),
      'bill_soft_copy_to_email_address'                        => new sfWidgetFormInputCheckbox(),
      'bill_hard_copy_to_business_address'                     => new sfWidgetFormInputCheckbox(),
      'bill_summary_contact_name'                              => new sfWidgetFormInputText(),
      'bill_summary_contact_number'                            => new sfWidgetFormInputText(),
      'bill_summary_type'                                      => new sfWidgetFormChoice(array('choices' => array('ONE SUMMARY FOR COMPANY' => 'ONE SUMMARY FOR COMPANY', 'BREAKDOWN PER DEPARTMENT' => 'BREAKDOWN PER DEPARTMENT'))),
      'breakdown_department1'                                  => new sfWidgetFormInputText(),
      'breakdown_department1_contact_name_number'              => new sfWidgetFormInputText(),
      'breakdown_department1_bill_cut_off'                     => new sfWidgetFormInputText(),
      'breakdown_department1_corporate_id'                     => new sfWidgetFormInputText(),
      'breakdown_department2'                                  => new sfWidgetFormInputText(),
      'breakdown_department2_contact_name_number'              => new sfWidgetFormInputText(),
      'breakdown_department2_bill_cut_off'                     => new sfWidgetFormInputText(),
      'breakdown_department2_corporate_id'                     => new sfWidgetFormInputText(),
      'breakdown_department3'                                  => new sfWidgetFormInputText(),
      'breakdown_department3_contact_name_number'              => new sfWidgetFormInputText(),
      'breakdown_department3_bill_cut_off'                     => new sfWidgetFormInputText(),
      'breakdown_department3_corporate_id'                     => new sfWidgetFormInputText(),
      'breakdown_department4'                                  => new sfWidgetFormInputText(),
      'breakdown_department4_contact_name_number'              => new sfWidgetFormInputText(),
      'breakdown_department4_bill_cut_off'                     => new sfWidgetFormInputText(),
      'breakdown_department4_corporate_id'                     => new sfWidgetFormInputText(),
      'breakdown_department5'                                  => new sfWidgetFormInputText(),
      'breakdown_department5_contact_name_number'              => new sfWidgetFormInputText(),
      'breakdown_department5_bill_cut_off'                     => new sfWidgetFormInputText(),
      'breakdown_department5_corporate_id'                     => new sfWidgetFormInputText(),
      'corporate_code'                                         => new sfWidgetFormInputText(),
      'bulk_service'                                           => new sfWidgetFormInputText(),
      'max_authorized_recipients'                              => new sfWidgetFormInputText(),
      'distribution_type'                                      => new sfWidgetFormChoice(array('choices' => array('EQUAL' => 'EQUAL', 'PRIORITIZATION' => 'PRIORITIZATION'))),
      'nominated_postpaid_charging_account'                    => new sfWidgetFormInputText(),
      'corporate_id'                                           => new sfWidgetFormInputText(),
      'status'                                                 => new sfWidgetFormChoice(array('choices' => array('COMPLETION' => 'COMPLETION', 'PROCESSING' => 'PROCESSING', 'ACTIVATED' => 'ACTIVATED'))),
      'deleted'                                                => new sfWidgetFormInputCheckbox(),
      'created_at'                                             => new sfWidgetFormDateTime(),
      'updated_at'                                             => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                                                     => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'ref_number'                                             => new sfValidatorString(array('max_length' => 25)),
      'company_name'                                           => new sfValidatorString(array('max_length' => 150)),
      'business_address'                                       => new sfValidatorPass(),
      'business_brgy_municipality_town'                        => new sfValidatorString(array('max_length' => 150)),
      'business_city_province'                                 => new sfValidatorString(array('max_length' => 150)),
      'business_postal_code_zip_code'                          => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'number_of_employees'                                    => new sfValidatorChoice(array('choices' => array(0 => '1-50', 1 => '51-100', 2 => '101-200', 3 => '201-500', 4 => '501-1,000', 5 => '1,001 & UP'), 'required' => false)),
      'nature_of_business'                                     => new sfValidatorChoice(array('choices' => array(0 => 'GOVERNMENT', 1 => 'BPO/CALL CENTER', 2 => 'HOLDINGS COMPANY', 3 => 'POWER & UTILITIES', 4 => 'PETROLEUM', 5 => 'INSURANCE', 6 => 'BANKING', 7 => 'LOGISTICS', 8 => 'TRANSPORT & FREIGHT', 9 => 'RETAIL', 10 => 'HOTELS & RESORTS', 11 => 'MANUFACTURING', 12 => 'SEMICON & ELECTRONICS', 13 => 'PHARMACEUTICALS', 14 => 'GLOBAL SERVICE PROVIDER', 15 => 'LOCAL TELCO/ISP', 16 => 'MEDIA'), 'required' => false)),
      'latest_ranking_of_company'                              => new sfValidatorChoice(array('choices' => array(0 => 'Top 50', 1 => 'Top 100', 2 => 'Top 250', 3 => 'Top 500', 4 => 'Top 1,000', 5 => 'Beyond 1,000'), 'required' => false)),
      'sector'                                                 => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'number_of_lines_applied_for'                            => new sfValidatorInteger(),
      'authorized_corporate_officer_signatory1'                => new sfValidatorString(array('max_length' => 150)),
      'authorized_corporate_officer_signatory1_position'       => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory1_contact_number' => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory1_email_address'  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory2'                => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory2_position'       => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory2_contact_number' => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory2_email_address'  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'after_sales_signatory_ies1'                             => new sfValidatorString(array('max_length' => 150)),
      'after_sales_signatory_ies1_position'                    => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'after_sales_signatory_ies1_contact_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'after_sales_signatory_ies1_email_address'               => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory3'                => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory3_position'       => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory3_contact_number' => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'authorized_corporate_officer_signatory3_email_address'  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'vat'                                                    => new sfValidatorBoolean(array('required' => false)),
      'vat_bir_certificate_account_number'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'oct'                                                    => new sfValidatorBoolean(array('required' => false)),
      'oct_bir_certificate_account_number'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'corporate_managed_bills_sent_to'                        => new sfValidatorChoice(array('choices' => array(0 => 'ONE RECIPIENT', 1 => 'ASSIGNEES'), 'required' => false)),
      'bill_recipient_company_name'                            => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_recipient_attention'                               => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_recipient_unit_number_floor'                       => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_recipient_department'                              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_recipient_building_street'                         => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'receive_bill_summary'                                   => new sfValidatorBoolean(array('required' => false)),
      'bill_soft_copy_to_email_address'                        => new sfValidatorBoolean(array('required' => false)),
      'bill_hard_copy_to_business_address'                     => new sfValidatorBoolean(array('required' => false)),
      'bill_summary_contact_name'                              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_summary_contact_number'                            => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bill_summary_type'                                      => new sfValidatorChoice(array('choices' => array(0 => 'ONE SUMMARY FOR COMPANY', 1 => 'BREAKDOWN PER DEPARTMENT'), 'required' => false)),
      'breakdown_department1'                                  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department1_contact_name_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department1_bill_cut_off'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department1_corporate_id'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department2'                                  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department2_contact_name_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department2_bill_cut_off'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department2_corporate_id'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department3'                                  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department3_contact_name_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department3_bill_cut_off'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department3_corporate_id'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department4'                                  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department4_contact_name_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department4_bill_cut_off'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department4_corporate_id'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department5'                                  => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department5_contact_name_number'              => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department5_bill_cut_off'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'breakdown_department5_corporate_id'                     => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'corporate_code'                                         => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'bulk_service'                                           => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'max_authorized_recipients'                              => new sfValidatorInteger(array('required' => false)),
      'distribution_type'                                      => new sfValidatorChoice(array('choices' => array(0 => 'EQUAL', 1 => 'PRIORITIZATION'), 'required' => false)),
      'nominated_postpaid_charging_account'                    => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'corporate_id'                                           => new sfValidatorString(array('max_length' => 150, 'required' => false)),
      'status'                                                 => new sfValidatorChoice(array('choices' => array(0 => 'COMPLETION', 1 => 'PROCESSING', 2 => 'ACTIVATED'), 'required' => false)),
      'deleted'                                                => new sfValidatorBoolean(array('required' => false)),
      'created_at'                                             => new sfValidatorDateTime(),
      'updated_at'                                             => new sfValidatorDateTime(),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorDoctrineUnique(array('model' => 'ApplicationCorporateManaged', 'column' => array('ref_number')))
    );

    $this->widgetSchema->setNameFormat('application_corporate_managed[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ApplicationCorporateManaged';
  }

}
